<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://genshi.edgewall.org/"
          xmlns:xi="http://www.w3.org/2001/XInclude" lang="en">
    <?python
    from pyleo.lib.mime_type import mime_image
    ?>
    <div py:def="directory(files,dirs)">
        <span py:for="f in files" class="dirEntry">
            <a href="${f['url']}">
            <span class="icon"><img src="${mime_image(f['mime_type'])}"/></span>${f['title']}</a> 
        </span>
        <span py:for="d in dirs" class="dirEntry">
            <a href="${d['url']}">
            <span class="icon"><img src="${mime_image('folder')}"/></span>${d['title']}</a> 
        </span>
    </div>
</html>